package com.sds.smarthome.foundation.entity;

/**
 * Created by L on 2016/11/22.
 */

public enum InstallCcuResult {

    START_INSTALL(0),
    INSTALLING(1),
    NO_UPDATEFILE(2),
    SYSTEM_BUSY(3),
    UNKNOWN(-1);

    private int value;

    InstallCcuResult(int value) {
        this.value = value;
    }

    public static InstallCcuResult parseValue(int value) {
        switch (value) {
            case 0:
                return START_INSTALL;
            case 1:
                return INSTALLING;
            case 2:
                return NO_UPDATEFILE;
            case 3:
                return SYSTEM_BUSY;
            default:
                return UNKNOWN;
        }
    }
}
